﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CompanyProfile.aspx.cs" Inherits="CompanyProfile"
    MasterPageFile="~/Default.master" EnableViewState="false" %>

<%@ Register Assembly="DevExpress.Web.ASPxHtmlEditor.v9.2, Version=9.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxHtmlEditor" TagPrefix="dxhe" %>

<%@ Register Assembly="DevExpress.Web.v9.2, Version=9.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxCallback" TagPrefix="dxcb" %>
<asp:Content ContentPlaceHolderID="head" ID="hd" runat="server" EnableViewState="false">

    <script src="CompanyProfile.js" type="text/javascript"></script>

    

    <script src="js/FileUpload.js" type="text/javascript"></script>
    <script src="js/LOV.js" type="text/javascript"></script>

    <script src="js/Datetimepicker.js" type="text/javascript"></script>
    <link href="CompanyProfile.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ContentPlaceHolderID="leftMenu" ID="leftnav" runat="server" EnableViewState="false">
    <%  if (String.IsNullOrEmpty(m_sxCompanyId))
        { 
            Response.Write(GenerateSideMenu());
        }
        else
        {
            Response.Write(GenerateSideMenu("?cid", m_sxCompanyId));
        } %>
</asp:Content>
<asp:Content ContentPlaceHolderID="content" ID="ctnCompanyProfile" runat="server"
    EnableViewState="false">
    <% if (!String.IsNullOrEmpty(m_sxCompanyId))
       { %>
    <input type="hidden" id="hidContactId" value="" />
    <input type="hidden" id="hidCompanyId" value="<% Response.Write(m_sxCompanyId); %>" />
    <div id="pnlCompanyTitle" runat="server"></div>
    <fieldset class="m_fs_border" id="fs_Summary">
        <legend>
            <a class="lnk" href="javascript:toggle('Summary');">
                Summary</a>
        </legend>
        <div id="div_Summary" style="width:500px;">
            <p><% Response.Write(m_cpd.sxSummary); %></p>
        </div>
    </fieldset>
    <fieldset class="m_fs_border" id="fs_BasicInfo">
        <legend>
            <a class="lnk" href="javascript:toggle('BasicInfo');">
                Basic Info</a>
        </legend>
        <dl class="m_fs">
            <div id="div_BasicInfo">
                <% Response.Write(m_cpd.BuildFieldSet_BasicInfo()); %>
            </div>
        </dl>
        <dxcb:ASPxCallback ID="cbkBasicInfo" ClientInstanceName="cbkBasicInfo_c" runat="server"
            OnCallback="cbkBasicInfo_Callback">
            <ClientSideEvents CallbackComplete="function(s, e) { cbkBasicInfo_c_CallbackComplete(e); }" />
        </dxcb:ASPxCallback>
        <div id="lnkdscd_BasicInfo" class="lnk" style="float: right; margin-left: 5px; display: none;"
            onclick="BasicInfo_Discard();" visible="false">
            discard</div>
        <div id="lnkedit_BasicInfo" class="lnk" style="float: right; margin-left: 5px;" onclick="BasicInfo_OnClick();">
            edit</div>
        <div id="lnkadd_BasicInfo" class="lnk" style="float: left; margin-left: 15px; display: none;"
            onclick="AddBasicInfo();">
            add info++</div>
        <div id="load_BasicInfo" style="float: right; padding-right: 10px;">
        </div>
    </fieldset>
    <fieldset class="m_fs_border" id="fs_ContactInfo">
        <legend>
            <a class="lnk" href="javascript:toggle('ContactInfo');">
                Contact Info</a>
        </legend>
        <dl class="m_fs">
            <div id="div_ContactInfo">
                <%Response.Write(m_cid.BuildFieldSet_ContactInfo());%>
            </div>
        </dl>
        <dxcb:ASPxCallback ID="cbkContactInfo" ClientInstanceName="cbkContactInfo_c" runat="server"
            OnCallback="cbkContactInfo_Callback">
            <ClientSideEvents CallbackComplete="function(s, e) { cbkContactInfo_c_CallbackComplete(e); }" />
        </dxcb:ASPxCallback>
        <div id="lnkdscd_ContactInfo" class="lnk" style="float: right; margin-left: 5px; display: none;"
            onclick="ContactInfo_Discard();" visible="false">
            discard</div>
        <div id="lnkedit_ContactInfo" class="lnk" style="float: right; margin-left: 5px; display: none;" onclick="ContactInfo_OnClick();">
            edit</div>
        <div id="lnkadd_ContactInfo" class="lnk" style="float: right; margin-left: 5px;"
            onclick="AddNewContact();">
            add new contact++</div>
        <div id="load_ContactInfo" style="float: right; padding-right: 10px;">
        </div>
    </fieldset>
    <fieldset class="m_fs_border" id="fs_BriefDesc">
        <legend>
            <a class="lnk" href="javascript:toggle('BriefDesc');">
                Brief Description</a>
        </legend>
        <div id="div_BriefDesc" style="width:500px;">
            <div id="cnt_BriefDesc"><% Response.Write(m_cpd.BuildFieldSet_BriefDesc()); %></div>
            <div id="edt_BriefDesc" style="height:0px; overflow:hidden;">
                <dxhe:ASPxHtmlEditor ID="hteBriefDesc" ClientInstanceName="hteBriefDesc_c" runat="server"
                Width="500px" ActiveView="Design" >
                    <SettingsImageUpload UploadImageFolder="~/upload/briefdesc/">
                        <ValidationSettings AllowedFileExtensions=".jpe,.jpeg,.jpg,.gif,.png" MaxFileSize="500000">
                        </ValidationSettings> 
                    </SettingsImageUpload>
                </dxhe:ASPxHtmlEditor>
            <div id="mod_BriefDesc" style="display:none;"></div>
            </div>
        </div>
        <dxcb:ASPxCallback ID="cbkBriefDesc" ClientInstanceName="cbkBriefDesc_c" runat="server"
            OnCallback="cbkBriefDesc_Callback">
            <ClientSideEvents CallbackComplete="function(s, e) { cbkBriefDesc_c_CallbackComplete(e); }" />
        </dxcb:ASPxCallback>
        <div id="lnkdscd_BriefDesc" class="lnk" style="float: right; margin-left: 5px; display: none;" onclick="BriefDesc_Discard();">
            discard</div>
        <div id="lnkedit_BriefDesc" class="lnk" style="float: right;" onclick="BriefDesc_OnClick();">
            edit</div>
        <div id="load_BriefDesc" style="float: right; padding-right: 10px;">
        </div>
    </fieldset>
    <% }
       else
    {%>
        <div id="pnlCompanyList" runat="server" />
    <%} %>
</asp:Content>
